#pragma once

#include <opencv2\core\core.hpp>
#include "MyMarker.h"


using namespace cv;

MyMarker::MyMarker(void) {
}

MyMarker::MyMarker(int id, double x, double y, double height) {
    this->id = id;
    this->x = x;
    this->y = y;
    this->height = height;
}

MyMarker::~MyMarker(void) {
}

int MyMarker::getId() const {
    return id;
}

double MyMarker::getX() const {
    return x;
}

double MyMarker::getY() const {
    return y;
}

double MyMarker::getHeight() const {
    return height;
}

Vec3f MyMarker::getCenter() const {
    return center;
}

Vec3f MyMarker::getUpperLeft() const {
    return upperLeft;
}

Vec3f MyMarker::getUpperRight() const {
    return upperRight;
}

Vec3f MyMarker::getLowerLeft() const {
    return lowerLeft;
}

Vec3f MyMarker::getLowerRight() const {
    return lowerRight;
}

Vec3f MyMarker::getUpperMiddle() const {
	Vec3f upperMiddle;

	upperMiddle[0] = (upperLeft[0] + upperRight[0]) / 2.0;
	upperMiddle[1] = (upperLeft[1] + upperRight[1]) / 2.0;
	upperMiddle[2] = (upperLeft[2] + upperRight[2]) / 2.0;

	return upperMiddle;
}

Vec3f MyMarker::getLowerMiddle() const {
	Vec3f lowerMiddle;

	lowerMiddle[0] = (lowerLeft[0] + lowerRight[0]) / 2.0;
	lowerMiddle[1] = (lowerLeft[1] + lowerRight[1]) / 2.0;
	lowerMiddle[2] = (lowerLeft[2] + lowerRight[2]) / 2.0;

	return lowerMiddle;
}

void MyMarker::setId(int id) {
    this->id = id;
}

void MyMarker::setX(double x) {
    this->x = x;
}

void MyMarker::setY(double y) {
    this->y = y;
}

void MyMarker::setHeight(double height) {
    this->height = height;
}

void MyMarker::setCenter(Vec3f center) {
    this->center = center;
}

void MyMarker::setUpperLeft(Vec3f upperLeft) {
    this->upperLeft = upperLeft;
}

void MyMarker::setUpperRight(Vec3f upperRight) {
    this->upperRight = upperRight;
}

void MyMarker::setLowerLeft(Vec3f lowerLeft) {
    this->lowerLeft = lowerLeft;
}

void MyMarker::setLowerRight(Vec3f lowerRight) {
    this->lowerRight = lowerRight;
}
